﻿<?xml version="1.0" encoding="utf-8"?>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
        x:Class="ICSharpCode.SharpDevelop.Gui.TreeViewOptionsDialog"
        Height="414"
        Width="552"
        MinHeight="260"
        MinWidth="480"
        WindowStartupLocation="CenterOwner"
        Style="{x:Static core:GlobalStyles.DialogWindowStyle}">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition
				Height="1*" />
			<RowDefinition
				Height="Auto" />
		</Grid.RowDefinitions>
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition
					Width="200" />
				<ColumnDefinition
					Width="1*" />
			</Grid.ColumnDefinitions>
			<TreeView Name="treeView" Margin="0 0 2 0">
				<TreeView.ItemContainerStyle>
					<Style TargetType="{x:Type TreeViewItem}">
						<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
						<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
					</Style>
				</TreeView.ItemContainerStyle>
				
				<TreeView.ItemTemplate>
					<HierarchicalDataTemplate ItemsSource="{Binding Children}">
						<StackPanel Orientation="Horizontal" Margin="-16 0 0 0">
							<Image Source="{Binding Image}" Width="16" Height="16" />
							<TextBlock Text="{Binding Title}" />
						</StackPanel>
					</HierarchicalDataTemplate>
				</TreeView.ItemTemplate>
			</TreeView>
			<GridSplitter Width="2" />
			<ScrollViewer Name="optionPanelScrollViewer"
			              Grid.Column="1"
			              HorizontalScrollBarVisibility="Disabled"
			              VerticalScrollBarVisibility="Auto">
				<DockPanel>
					<TextBlock
						DockPanel.Dock="Top"
						Name="optionPanelTitle"
						FontFamily="Tahoma" FontSize="14pt" FontWeight="Bold"
						Padding="8"
					>
						<TextBlock.Background>
							<LinearGradientBrush StartPoint="0, 0" EndPoint="0, 1">
								<LinearGradientBrush.GradientStops>
									<GradientStop Offset="0.0"
									              Color="{DynamicResource {x:Static SystemColors.WindowColorKey}}" />
									<GradientStop Offset="1.0"
									              Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}" />
								</LinearGradientBrush.GradientStops>
							</LinearGradientBrush>
						</TextBlock.Background>
					</TextBlock>
					<ContentPresenter Name="optionPanelContent" />
				</DockPanel>
			</ScrollViewer>
		</Grid>
		<widgets:UniformGridWithSpacing Columns="2" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Margin="0,4,12,12">
			<Button
				Content="{core:Localize Global.OKButtonText}"
				IsDefault="True"
				Name="okButton"
				Style="{x:Static core:GlobalStyles.ButtonStyle}"
				Click="okButtonClick" />
			<Button
				Content="{core:Localize Global.CancelButtonText}"
				IsCancel="True"
				Name="cancelButton"
				Style="{x:Static core:GlobalStyles.ButtonStyle}"
				Click="cancelButtonClick" />
		</widgets:UniformGridWithSpacing>
	</Grid>
</Window>